﻿using Newtonsoft.Json;
using PW.Api;
using PW.Api.Model;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PW.Api.Api
{
    public class UserApi
    {
        public static ResponseContent listUser(SysUser queryData)
        {
            ResponseContent res = Request.get("/system/user/list", queryData);
            return res;
        }

        public static ResponseContent addUser(SysUser data)
        {
            ResponseContent res = Request.post("/system/user", data);
            return res;
        }

        public static ResponseContent updateUser(SysUser data)
        {
            ResponseContent res = Request.put("/system/user", data);
            return res;
        }

        public static ResponseContent delUser(List<long> ids)
        {
            ResponseContent res = Request.delete("/system/user/" + ids.ToString(), null);
            return res;
        }
    }
}
